#!/bin/bash

IFS=$'\n'

# 这里写上要排除的 文件 or 文件夹, 一行一个文件
excluded="
models
build
cmake-build-debug
"

for file in $excluded
do
	git rm -r --cached "$file"
done 2>/dev/null


included=$(ls)
for file in $excluded
do
	included=$(printf "$included" | grep -v "$file")
done

for file in $included
do
	git add "$file"
done

git commit -m "自动提交"
git push -u origin master

L_GREEN="\033[1;32m"
NONE="\033[0m"
printf "\n$L_GREEN未提交 or 移除的 文件：$excluded $NONE\n"

exit
